package com.kasax.bus.bean;

import com.kasax.bus.corel.ThreadMode;

import java.lang.reflect.Method;

/**
 * 注册类中的方法信息
 */
public class SubscribeMethod {
    // 方法
    private Method method;
    // 线程类型
    private ThreadMode threadMode;
    // 事件类型
    private Class<?> eventType;

    public SubscribeMethod() {
    }

    public SubscribeMethod(Method method, ThreadMode threadMode, Class<?> eventType) {
        this.method = method;
        this.threadMode = threadMode;
        this.eventType = eventType;
    }

    public Method getMethod() {
        return method;
    }

    public void setMethod(Method method) {
        this.method = method;
    }

    public ThreadMode getThreadMode() {
        return threadMode;
    }

    public void setThreadMode(ThreadMode threadMode) {
        this.threadMode = threadMode;
    }

    public Class<?> getEventType() {
        return eventType;
    }

    public void setEventType(Class<?> eventType) {
        this.eventType = eventType;
    }

    @Override
    public String toString() {
        return "SubscribeMethod{" +
                "method=" + method +
                ", threadMode=" + threadMode +
                ", eventType=" + eventType +
                '}';
    }
}
